1. Technical Field
The present invention relates in general to the field of musical synthesis and in particular to the field of digital musical synthesizers which utilize Musical Instrument Digital Interface (MIDI) files. Still more particularly, the present invention relates to a method and apparatus for permitting the efficient editing of MIDI files utilizing traditional "cut and paste" techniques.
2. Description of the Related Art
MIDI, the "Musical Instrument Digital Interface" was established as a hardware and software specification which would make it possible to exchange information such as: musical notes, program changes, expression control, etc. between different musical instruments or other devices such as: sequencers, computers, lighting controllers, mixers, etc. This ability to transmit and receive data was originally conceived for live performances, although subsequent developments have had enormous impact in recording studios, audio and video production, and composition environments.
A standard for the MIDI interface has been prepared and published as a joint effort between the MIDI Manufacturer's Association (MMA) and the Japan MIDI Standards Committee (JMSC). This standard is subject to change by agreement between JMSC and MMA and is currently published as the MIDI 1.0 Detailed Specification, Document Version 4.1, January 1989.
The hardware portion of the MIDI interface operates at 31.25 KBaud, asynchronous, with a start bit, eight data bits and a stop bit. This makes a total of ten bits for a period of 320 microseconds per serial byte. The start bit is a logical zero and the stop bit is a logical one. Bytes are transmitted by sending the least significant bit first. Data bits are transmitted in the MIDI interface by utilizing a five milliamp current loop. A logical zero is represented by the current being turned on and a logical one is represented by the current being turned off. Rise times and fall times for this current loop shall be less than two microseconds. A five pin DIN connector is utilized to provide a connection for this current loop with only two pins being utilized to transmit the current loop signal. Typically, an opto-isolater is utilized to provide isolation between devices which are coupled together utilizing a MIDI format.
Communication utilizing the MIDI interface is achieved through multi-byte "messages" which consist of one status byte followed by one or two data bytes. There are certain exceptions to this rule. MIDI messages are sent over any of sixteen channels which may be utilized for a variety of performance information. There are five major types of MIDI messages: Channel Voice; Channel Mode; System Common; System Real-Time; and, System Exclusive. A MIDI event is transmitted as a message and consists of one or more bytes.
A channel message in the MIDI system utilizes four bits in the status byte to address the message to one of sixteen MIDI channels and four bits to define the message. Channel messages are thereby intended for the receivers in a system whose channel number matches the channel number encoded in the status byte. An instrument may receive a MIDI message on more than one channel. The channel in which it receives its main instructions, such as which program number to be on and what mode to be in, is often referred to as its "Basic Channel." There are two basic types of channel messages, a Voice message and a Mode message. A Voice message is utilized to control an instrument's voices and Voice messages are typically sent over voice channels. A Mode message is utilized to define the instrument's response to Voice messages, Mode messages are generally sent over the instrument's Basic Channel.
System messages within the MIDI system may include Common messages, Real-Time messages, and Exclusive messages. Common messages are intended for all receivers in a system regardless of the channel that receiver is associated with. Real-Time messages are utilized for synchronization and are intended for all clock based units in a system. Real-Time messages contain status bytes only, and do not include data bytes. Real-Time messages may be sent at any time, even between bytes of a message which has a different status. Exclusive messages may contain any number of data bytes and can be terminated either by an end of exclusive or any other status byte, with the exception of Real-Time messages. An end of exclusive should always be sent at the end of a system exclusive message. System exclusive messages always include a manufacturer's identification code. If a receiver does not recognize the identification code it will ignore the following data.
As those skilled in the art will appreciate upon reference to the foregoing, musical compositions may be encoded utilizing the MIDI standard and stored and/or transmitted utilizing substantially less data. The MIDI standard permits the transmittal of a serial listing of program status messages and channel messages, such as "note on" and "note off" and as a consequence require substantially less digital data to encode than the straightforward digitization of an analog music signal.
A problem which has arisen as a result of the serial nature of the MIDI standard occurs when a user desires to edit a MIDI file by removing sections from one area of the file for utilization in a second or subsequent file or by deleting and/or altering sections of an existing file. Due to the serial nature of a MIDI file, the removal of a section of that file in a traditional "cut and paste" type operation may cause serious problems due to the removal of information which is necessary for the source file to continue to function. For example, a particular note may be turned on at one point within the serial data stream and be turned off at a second point in the data stream. The removal of that section of the data stream which includes the note off message will result in a "hanging" note which will never be turned off. Similarly, certain control functions such as: volume, balance, pan, sostenuto, soft pedal, tremolo, or other such functions may be unwittingly removed from the source file, resulting in an entirely unexpected and unacceptable modification to the source file, a lifted or copied section, or a target file which receives the lifted or copied section.
As a consequence, the editing of MIDI files is generally accomplished in the prior art by sophisticated users who utilize complex MIDI sequencers. It should therefore be apparent that a need exist for a method and apparatus which permits the rapid, efficient and uncomplicated editing of MIDI files, while retaining a result which is substantially identical to that which would occur in the editing of a digitized audio file.